package be.vdab.dao;

import java.util.List;

import javax.persistence.TypedQuery;

import be.vdab.entities.Land;

public class LandDAO extends AbstractDAO {

	public List<Land> findLanden() {
		TypedQuery<Land> query = getEntityManager().createNamedQuery(
				"Land.findLanden", Land.class);
		return query.getResultList();
	}

	public Land readLand(long landNr) {
		TypedQuery<Land> query = getEntityManager().createNamedQuery(
				"Land.readLand", Land.class);
		query.setParameter("landNr", landNr);
		return query.getSingleResult();
	}

	
}
